package com.lanou.pianke.search.web.controller;

import com.lanou.pianke.search.entity.ArticleComment;
import com.lanou.pianke.search.service.ArticleCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/es/")
@RestController
public class AcommentController {

    @Autowired
    private ArticleCommentService articleCommentService;


    // 根据文章评论内容查评论
    @GetMapping("findByAcommentContent")
    public List<ArticleComment> findByProdName(String searchContent){
        return articleCommentService.searchByAcommentContent(searchContent);
    }

    // 根据文章评论id查评论
    @GetMapping("findByAcomid")
    public ArticleComment findByAcomid( String acomid){
        return articleCommentService.findByAcomid(acomid);
    }

}
